home *** CD-ROM | disk | FTP | other *** search
Makefile | 1995-02-15 | 6.6 KB | 253 lines |
- # Makefile for any machine
- # - based on my newer makefile and the GREATE
- # modifications by Mike Battersby
- ###############################################################################
- #
- # CONFIGURATION OPTIONS
- #
-
- # Choose your machine type. Possible types as of this version (4.11)
- # are
- # hpalib, hplow, hp3, dec, solaris, sparc, linux, freebsd, sgi,
- # soundblaster, aix, next.
- # gmake needed to handle this file in FreeBSD and NeXTStep
- MACHINE = sparc
-
- # The name of your C compiler. For most machines this will be
- # either 'cc' or 'gcc'.
- CC = acc
-
- OPTS=-c
-
- # User interface type. Right now, this is Unix as there are no alternatives.
- UI = Unix/./
-
- PREFIX=/users/algo/espie/pub
- # Destination directory for tracker binaries and manpage.
- #
- # If you don't wish to use the 'make install' and 'make install.man'
- # commands, you can ignore these.
- BIN_DIR = $(PREFIX)/bin
- MAN_DIR = $(PREFIX)/man
-
- # Where to put the compression methods description
- COMPRESSION_FILE=$(PREFIX)/lib/compression_methods
-
- # How to install the binaries and manpage. If you have a unix system,
- # use the GNU install program if you have it, otherwise try 'cp'. For
- # non-unix systems, make this the command for copying a file with the
- # following syntax
- # <program_name> <source_name> <destination_name>
- #
- # If you don't wish to use the 'make install' and 'make install.man'
- # commands, you can ignore this.
- INSTALL = install
-
- # Permissions and user/group id's to install with. Non-unix users
- # should comment these out (alternatively, you can use these to
- # provide arguments for the above $(INSTALL) program). If you want
- # to install tracker setuid root (which will allow it to renice
- # itself when non-root users run it), change the "-m 755" below to
- # "-m 4755". If you do so, you must be root to run make install.
- #
- # If you don't wish to use the 'make install' and 'make install.man'
- # commands, you can ignore these.
- INST_BIN_OPT = -c -s -m 755 -o root -g root
- INST_MAN_OPT = -c -m 644 -o root -g root
- ###############################################################################
- #
- # C compiler flags and libraries for each machine.
- # Unless you are porting this to a new architecture, you shouldn't
- # need to change these (on the other hand, if you understand what you
- # are doing, go ahead!).
- #
-
- CFLAGS_next = -O3 -fomit-frame-pointer -funroll-loops -ffast-math -Wall
- LIBS_next =
- AUDIODIR_next = NeXT/
- CONFIG_next = NeXT/
-
- CFLAGS_hpalib = +O3 +OS +ESlit
- LIBS_hpalib = -lAt -lAlib -lm
- AUDIODIR_hpalib=Hpux/
- AUDIONAME_hpalib=alib_
- CONFIG_hpalib = Hpux/
-
- CFLAGS_hplow = -Ae +O3 -Wl, -a,archive -s
- LIBS_hplow=-lM
- AUDIODIR_hplow=Hpux/
- AUDIONAME_hplow=low_
- CONFIG_hplow = Hpux/
-
- # yet another port to hp! This one might be the best yet.
- CFLAGS_hp3 = +O3 +OS +ESlit
- LIBS_hp3 = -lAt -lAlib -lm
- AUDIODIR_hp3=Hpux/
- AUDIONAME_hp3=3_
- CONFIG_hp3 = Hpux/3_
-
- CFLAGS_solaris = -O
- LIBS_solaris = -lm
- AUDIODIR_solaris=Sparc/
- CONFIG_solaris = Sparc/solaris_
-
-
- #CFLAGS_sparc = -g
- CFLAGS_sparc = -O4 -Bstatic
- #CFLAGS_sparc = -O2 -finline-functions -funroll-loops -Wall
- LIBS_sparc = -lm
- AUDIODIR_sparc=Sparc/
- CONFIG_sparc = Sparc/
-
- CFLAGS_dec = -O
- LIBS_dec = -lm -lAF
- AUDIODIR_dec=AF/
- CONFIG_dec = AF/dec_
-
- CFLAGS_sgi = -j -O
- LIBS_sgi = -laudio -lm
- AUDIODIR_sgi=Sgi/
- CONFIG_sgi = Sgi/
-
- CFLAGS_soundblaster = -O
- LIBS_soundblaster = -lm
- AUDIODIR_soundblaster=Soundblaster/
- CONFIG_soundblaster = Soundblaster/
-
- CFLAGS_linux = -N -O2 -funroll-loops
- LIBS_linux = -lm
- AUDIODIR_linux=PCux/
- CONFIG_linux = PCux/linux_
-
- CFLAGS_freebsd = -O2 -Dstricmp=strcasecmp
- LIBS_freebsd = -lm
- AUDIODIR_freebsd=PCux/
- CONFIG_freebsd = PCux/freebsd_
-
- CFLAGS_aix = -O
- LIBS_aix = -lm
- AUDIODIR_aix = Aix/
- CONFIG_aix = Aix/
-
- CFLAGS = $(CFLAGS_${MACHINE})
- COPTS = $(OPTS) $(CFLAGS)
- LIBS = $(LIBS_${MACHINE})
- CONFIG = Arch/$(CONFIG_${MACHINE})
- AUDIODIR = Arch/$(AUDIODIR_${MACHINE})
- AUDIONAME = $(AUDIONAME_${MACHINE})
- AUDIO = $(AUDIODIR)$(AUDIONAME)
-
- OBJ_TRACKER = main.o $(AUDIO)audio.o st_read.o commands.o \
- resample.o automaton.o st_play.o getopt.o open.o tools.o \
- dump_song.o setup_audio.o notes.o display.o empty.o \
- $(UI)ui.o prefs.o tags.o autoinit.o
-
- OBJ_ANALYZER = analyzer.o st_read.o open.o dump_song.o tools.o notes.o \
- prefs.o autoinit.o ${UI}ui.o display.o empty.o
-
- OBJ_SPLITMOD = split.o tools.o st_read.o dump_song.o open.o notes.o \
- display.o prefs.o autoinit.o $(UI)ui.o empty.o
-
- all: config.h tracker randomize analyzer splitmod
-
- config.h:
- cp $(CONFIG)config.h config.h
-
- install:
- $(INSTALL) $(INST_BIN_OPT) tracker $(BIN_DIR)
- $(INSTALL) $(INST_BIN_OPT) randomize $(BIN_DIR)
- $(INSTALL) $(INST_BIN_OPT) analyzer $(BIN_DIR)
- $(INSTALL) $(INST_BIN_OPT) splitmod $(BIN_DIR)
- [ -f ${COMPRESSION_FILE} ] || \
- $(INSTALL) $(INST_MAN_OPT) compression_methods ${COMPRESSION_FILE}
-
- install.man:
- $(INSTALL) $(INST_MAN_OPT) man/tracker.1 $(MAN_DIR)/man1/tracker.1
-
-
-
- devel:
- -rm -f $(BIN_DIR)/dtracker #$(BIN_DIR)/splitmod
- cp tracker $(BIN_DIR)/dtracker
- #- cp splitmod $(BIN_DIR)/splitmod
-
- tracker: ${OBJ_TRACKER}
- ${CC} -o tracker ${CFLAGS} ${OBJ_TRACKER} ${LIBS}
-
- dtracker: ${OBJ_TRACKER}
- ${CC} -o dtracker ${CFLAGS} ${OBJ_TRACKER} ${LIBS}
-
- analyzer: ${OBJ_ANALYZER}
- $(CC) -o analyzer ${CFLAGS} ${OBJ_ANALYZER} ${LIBS}
-
- randomize: randomize.c
- $(CC) -o randomize ${CFLAGS} randomize.c
-
- splitmod: ${OBJ_SPLITMOD}
- $(CC) -o splitmod ${CFLAGS} ${OBJ_SPLITMOD} ${LIBS}
-
- main.o: main.c song.h version.h
- $(CC) ${COPTS} main.c
-
- tools.o: main.c
- $(CC) ${COPTS} tools.c
-
- $(AUDIO)audio.o: $(AUDIO)audio.c
- cd $(AUDIODIR); $(CC) -I../.. ${COPTS} $(AUDIONAME)audio.c
-
- $(UI)ui.o: $(UI)ui.c
- cd $(UI); $(CC) -I.. ${COPTS} ui.c
-
- split.o: split.c
- $(CC) ${COPTS} split.c
-
- open.o: open.c Makefile
- $(CC) ${COPTS} -DCOMPRESSION_FILE=\"${COMPRESSION_FILE}\" open.c
-
- audio.o: audio.c
- $(CC) ${COPTS} audio.c
-
- automaton.o: automaton.c song.h channel.h
- $(CC) ${COPTS} automaton.c
-
- getopt.o: getopt.c getopt.h
- $(CC) ${COPTS} getopt.c
-
- player.o: player.c song.h channel.h
- $(CC) ${COPTS} player.c
-
- st_read.o: st_read.c song.h
- $(CC) ${COPTS} st_read.c
-
- commands.o: commands.c channel.h song.h
- $(CC) ${COPTS} commands.c
-
- dump_song.o: dump_song.c
- $(CC) $(COPTS) dump_song.c
- analyzer.o: analyzer.c
- $(CC) $(COPTS) analyzer.c
- setup_audio.o: setup_audio.c
- $(CC) $(COPTS) setup_audio.c
- notes.o: notes.c
- $(CC) $(COPTS) notes.c
-
- display.o: display.c
- $(CC) $(COPTS) display.c
-
-
- clean:
- -rm $(OBJ_TRACKER) $(OBJ_ANALYZER) $(OBJ_SPLITMOD) randomize.o
- -rm tracker randomize splitmod analyzer core
- -rm tracker.tar tracker.tar.Z tracker.lzh
- -rm config.h
-
- export:
- -rm tracker.tar.Z
- cd ..; tar -cvof tracker/tracker.tar -I tracker/arc.list
- -mkdir tmp
- cd tmp; tar xvf ../tracker.tar
- cd tmp; lha a ../tracker.lzh tracker
- rm -rf tmp;
- compress tracker.tar
-
-